import { createApp } from 'vue'
// import './style.css'
import App from './App.vue'
import './assets/rem'
import 'amfe-flexible'
import pinia from './store/index'
import router from './router'
import mitt from 'mitt';
import { VueMasonryPlugin } from 'vue-masonry';
const emitter = mitt();
import 'vant/es/dialog/style';
import 'vant/es/notify/style';
import './permission'
// 自定义全局组件
// 按需引入vant 组件
import { Tag,Tabbar, TabbarItem ,Field, CellGroup,Search, Form, Button, Cell,
    Card,SwipeCell,Stepper,ConfigProvider,Col,Row,SubmitBar,AddressEdit,AddressList,ContactCard, Notify  } from 'vant';
const app = createApp(App)
// createApp(App).use(createPinia()).mount('#app')
app.config.globalProperties.emitter = emitter
app.use(VueMasonryPlugin)

app.use(router)
app.use(pinia)
// vant组件注入
app.use(Tabbar);
app.use(Tag)
app.use(TabbarItem);
app.use(Form)
app.use(Field)
app.use(CellGroup)
app.use(Button);
app.use(Cell);
app.use(Col);
app.use(Row);
app.use(Search)
app.use(Card)
app.use(SwipeCell)
app.use(Stepper)
app.use(ConfigProvider)
app.use(SubmitBar)
app.use(AddressEdit)
app.use(AddressList )
app.use(ContactCard)
// 全局组件注册
app.mount('#app')